<!DOCTYPE html>
<html>
<head>
    <title>题目信息</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <a class="btn btn-primary" @click="upload"><i class="fa fa-plus"></i>&nbsp;上传</a>
            <input type="file" id="fileUploader" style="display: none;">
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
                    <div class="form-group">
                        <div class="col-sm-2 control-label">题目内容</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="examSubject.subjectContent" placeholder="题目内容"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">题目类型</div>
                        <div class="col-sm-10">
                            <!-- <input type="text" class="form-control" v-model="examSubject.subjectType" placeholder="题目类型"/> -->
                            <select v-model="examSubject.subjectType" name="" id="" class="form-control" >
                                <option value="1">选择</option>
                                <option value="2">判断</option>
                            </select>
                        </div>
                    </div>
                    <div v-show="examSubject.subjectType == 1" class="form-group" v-for="index of 4">
                        <div class="col-sm-2 control-label">题目选项{{ index }}</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="examOptionArray[index-1]" :placeholder="optionInputText + index"/>
                        </div>
                    </div>
                    <!-- <div class="form-group">
                        <div class="col-sm-2 control-label">题目选项2</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="examSubject.option2" placeholder="题目选项2"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">题目选项3</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="examSubject.option3" placeholder="题目选项3"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">题目选项4</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="examSubject.option4" placeholder="题目选项4"/>
                        </div>
                    </div> -->
                    <div class="form-group">
                        <div class="col-sm-2 control-label">题目答案</div>
                        <div class="col-sm-10">
                            <!-- <input type="text" class="form-control" v-model="examSubject.subjectAnswer" placeholder="题目答案（1，2，3，4）"/> -->
                            <select v-show="examSubject.subjectType == 1" sv-model="examSubject.subjectAnswer" name="" id="" class="form-control">
                                <option :value="index" v-for="index of 4">{{ index }}</option>
                            </select>
                            <select v-show="examSubject.subjectType == 2" sv-model="examSubject.subjectAnswer" name="" id="" class="form-control">
                                <option :value="index" v-for="index of 2">{{ index }}</option>
                            </select>
                        </div>
                    </div>
                <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/exam/examsubject.js?_${.now?long}"></script>
</body>
</html>